class Article < ApplicationRecord
	# dependent: :destroy删除一篇文章，文章的相关评论也需要删除
	has_many :comments, dependent: :destroy
	validates :title, presence: true,
                    length: { minimum: 5 }
end
